package com.bwda.dsrs.filecenter.domain.form.fileapply;

import com.bwda.dsrs.base.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author yangjun
 * @date 2019/4/11
 */
@Data
@ApiModel(description = "文件外发申请")
public class OutApplyCreatForm {


    @ApiModelProperty(value = "目录ID,逗号隔开")
    @NotNull(message = "文件不能为空")
    private String dirIds;

    /**
     * 申请标题
     */
    @NotNull(message = "标题不能为空")
    private String applyTitle;
    /**
     * 申请理由
     */
    @NotNull(message = "理由不能为空")
    private String applyReason;

    private String auditUserCode;

    @ApiModelProperty(value = "0一体化外发1原格式外发2明文外发")
    @NotNull(message = "外发方式不能为空")
    @Min(value = 0, message = "外发方式不正确!")
    @Max(value = 0, message = "外发方式不正确!")
    private Integer outType;


    @ApiModelProperty(value = "开始时间,格式为:" + DateUtil.FORMAT)
    @DateTimeFormat(pattern = DateUtil.FORMAT)
    private Date startTime;

    @ApiModelProperty(value = "结束时间,格式为:" + DateUtil.FORMAT)
    @DateTimeFormat(pattern = DateUtil.FORMAT)
    private Date endTime;

    @ApiModelProperty(value = "阅读次数")
    private Integer readTimes;

    @ApiModelProperty(value = "1编辑2复制等，逗号隔开")
    private String rightConfig;
    @ApiModelProperty(value = "1明文水印2屏幕水印3暗水印4打印水印")
    private String waterType;

    @ApiModelProperty(value = "允许使用MAC，为空则不限制")
    private String allowMac;


    @ApiModelProperty(value = "允许使用IP，为空则不限制")
    private String allowIp;

    @ApiModelProperty(value = "文件密码，为空则无密码")
    private String filePwd;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "0下载1邮件")
    @NotNull(message = "缺少发送方式")
    private Integer sendType;

    private Integer fileType;

    @ApiModelProperty(value = "邮件外发时，邮箱地址")
    private String emailAddr;


}
